package com.ulic.customerManApplication.studentmodule.service.impl;

import java.util.List;

import javax.annotation.Resource;


import org.springframework.stereotype.Component;

import com.ulic.customerManApplication.pager.PagerModel;
import com.ulic.customerManApplication.studentmodule.bo.SubStudent;
import com.ulic.customerManApplication.studentmodule.dao.SubStudentDao;
import com.ulic.customerManApplication.studentmodule.service.SubStudentService;
import com.ulic.customerManApplication.studentmodule.vo.SubStudentVO;
import com.ulic.customerManApplication.usermodule.bo.User;
@Component("subStudentService")
public class SubStudentServiceImpl implements SubStudentService {

	private SubStudentDao subStudentDao;
	
	public SubStudentDao getSubStudentDao() {
		return subStudentDao;
	}
	@Resource
	public void setSubStudentDao(SubStudentDao subStudentDao) {
		this.subStudentDao = subStudentDao;
	}
	@Override
	public void addSubStudent(SubStudent subStudent) throws Exception {

		subStudentDao.insertSubStudent(subStudent);
	}
	@Override
	public void addSubStudents(List<SubStudent> subStudents) throws Exception {

		subStudentDao.insertSubStudents(subStudents);
	}
	@Override
	public SubStudent getSubStudent(int id) {
		return subStudentDao.getSubStudent(id);
	}
	@Override
	public PagerModel getSubStudents(int curPage) {
		return subStudentDao.getSubStudents(curPage);
	}
	@Override
	public List<SubStudent> getSubStudents(User user) {
		return subStudentDao.getSubStudents(user);
	}
	@Override
	public PagerModel getSubStudents(SubStudentVO subStudentVO, int curPage) {
		return subStudentDao.getSubStudents(subStudentVO, curPage);
	}
	@Override
	public void modifySubStudent(SubStudent subStudent) throws Exception {

		subStudentDao.updateSubStudent(subStudent);
	}
	@Override
	public void removeSubStudent(SubStudent subStudent) throws Exception {

		subStudentDao.deleteSubStudent(subStudent);
	}
	@Override
	public List<SubStudent> getSubStudentsByJourId(Integer journeyLoveId) {
		return subStudentDao.getSubStudentsByJourId(journeyLoveId);
	}

	 
}
